package com.qingcheng.controller.order;

import com.alibaba.dubbo.config.annotation.Reference;
import com.qingcheng.pojo.order.TradeReport;
import com.qingcheng.service.order.TradeReportService;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/tradeReport")
public class TradeReportController {

    @Reference
    private TradeReportService tradeReportService;

    @GetMapping("/tradeCount")
    public List<Map> tradeCount(String date1, String date2){
        return tradeReportService.tradeReport(date1,date2);
    }

    @GetMapping("/tradeCount2")
    public List<Map> tradeCount2(String date1, String date2){
        return tradeReportService.tradeReport2(date1,date2);
    }

    @PostMapping("/find")
    public void find(){
        tradeReportService.createData();
    }



}
